
package com.core.multithreading.a;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Sunil
 */
public class Schedular {

    public static void main(String[] args) {
        List<String> list = new ArrayList<String>();
        Producer producer = new Producer(list);
        producer.start();
        
        Consumer consumer1 = new Consumer(list,"A");
        Consumer consumer2 = new Consumer(list,"B");
        Consumer consumer3 = new Consumer(list,"C");
        Consumer consumer4 = new Consumer(list,"D");
        consumer1.start();
        consumer2.start();
        consumer3.start();
        consumer4.start();
    }
    
}
